package com.adingxiong.quickstart.project.service.impl;

import com.adingxiong.quickstart.project.entity.Kpi;
import com.adingxiong.quickstart.project.mapper.KpiMapper;
import com.adingxiong.quickstart.project.service.IKpiService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.swagger.models.auth.In;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 * 属性 服务实现类
 * </p>
 *
 * @author xiongc
 * @since 2020-06-02
 */
@Service
public class KpiServiceImpl extends ServiceImpl<KpiMapper, Kpi> implements IKpiService {


    @Override
    public Kpi getKpiByGoodsId(Integer id) {
        QueryWrapper<Kpi> query = new QueryWrapper<>();
        query.eq("goods_id",id);
        Kpi kpi = baseMapper.selectOne(query);
        return  kpi;
    }
}
